package cloud.maque.demo2.controller;

import cloud.maque.common.core.response.R;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/demo2")
public class Demo2Controller {

    @GetMapping("/test")
    public R<String> test() {
        return R.ok("Hello from Demo2");
    }

    @GetMapping("/data/{id}")
    public R<String> getData(@PathVariable("id") String id) {
        return R.ok("Data from Demo2, ID: " + id);
    }
}
